function m2 = lpcvd_1DSurface_rmsslope(h,x)
if size(h,2)==1
    h = h';
end
if size(x,2)==1
    x = x';
end
m = [h(1)-h(end),diff(h)]./[x(1)-x(end),diff(x)];
m2 = var(m);
